package com.li.toolkit.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.lang.reflect.Method;

/**
 * Class 工具类
 *
 * @author LiDong
 * @version 1.0.0
 * @createTime 2/19/2022 10:12 AM
 */
public final class ClazzUtils {

    private static final Logger logger = LoggerFactory.getLogger(ClazzUtils.class);

    private ClazzUtils() {
    }

    /**
     * 获得一个类的所有的方法
     */
    public static void getAllMethods(Class clazz) {
        Method[] declaredMethods = clazz.getDeclaredMethods();
        for (Method declaredMethod : declaredMethods) {
            logger.info(String.valueOf(declaredMethod));
        }
    }

}
